home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / cachemon.zip / DEV_HEAD.A86 < prev    next >
Text File  |  1990-03-10  |  1KB  |  49 lines

  1. ; Fake device driver to monitor BIOS disk accesses
  2.  
  3.                 org     0
  4. next            dd      -1                      ; Device header
  5. attribute       dw      8000H                   ; non-IOCTL character device
  6. strategy_ptr    dw      offset strategy
  7. interrupt_ptr   dw      offset interrupt
  8. dname           db      'CACHE$$$',0
  9.  
  10. request         struc   [BX]                    ; Request header
  11. length          db      ?                       ; Common portion
  12. unit            db      ?
  13. command         db      ?
  14. status          dw      ?
  15. rq_reserved     db      8 dup (?)
  16.                 ends
  17.  
  18. in_header       struc   [BX+13]
  19. in_rq_units     db      ?                       ; Init portion
  20. in_end_address  dw      2 dup ?
  21. in_arg_ptr      dw      2 dup ?
  22. in_drive_number db      ?
  23.                 ends
  24.  
  25. request_ptr     dw      2 dup ?
  26.  
  27. strategy:
  28.                 cs mov  request_ptr,bx
  29.                 cs mov  request_ptr[2],es
  30.                 retf
  31. interrupt:
  32.                 pushf
  33.                 push    es,ds,ax,bx,si,di
  34.  
  35.                 mov     ds,cs
  36.              cs les     bx,request_ptr
  37.  
  38.                 es mov  al,command
  39.                 cmp     al,0
  40.                 jne     not_ready
  41.                 jmp     init
  42. not_ready:
  43.                 es mov  status, 08102H            ; Device not ready, done
  44. return:
  45.                 pop     di,si,bx,ax,ds,es
  46.                 popf
  47.                 retf
  48.  
  49.